// const viewPath = "@/views/";

import Lay1 from "@/layouts/Lay1.vue";

// 免登录白名单
export const defaultWhiteList = [
  "/home",
  "/login",
  "/register",
  "/401",
  "/403",
  "/404",
  "/500",
];
if (import.meta.env.VITE_APP_ENV === "development") {
  defaultWhiteList.push("/demo/**");
}

export const defaultRoutes = [
  {
    path: "/",
    name: "",
    redirect: "/home",
    component: Lay1,
    children: [
      {
        path: "/home",
        name: "home",
        meta: {
          title: "首页",
        },
        component: () => import("@/views/HomePage.vue"),
      },
    ],
  },
  {
    path: "/login",
    name: "login",
    component: () => import("@/views/console/LoginPage.vue"),
  },
  {
    path: "/register",
    name: "register",
    component: () => import("@/views/console/RegisterPage.vue"),
  },
  {
    path: "/401",
    name: "401",
    component: () => import("@/views/error/401.vue"),
  },
  {
    path: "/403",
    name: "403",
    component: () => import("@/views/error/403.vue"),
  },
  {
    path: "/:pathMatch(.*)",
    name: "404",
    component: () => import("@/views/error/404.vue"),
  },
  {
    path: "/500",
    name: "500",
    component: () => import("@/views/error/500.vue"),
  },
  {
    path: "/demo/1",
    name: "demo1",
    component: () => import("@/views/demo/d1.vue"),
  },
];
